<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.TreeMap"%>
<%
TreeMap check = (TreeMap) request.getAttribute("check");
String name = (String) request.getAttribute("name");
String type = (String) request.getAttribute("type");
String result = (String) request.getAttribute("result");

//Set content for seo
String title = UrlHelper.getDomainServer(request) + " - Network Tool Analysis";
String description = "Free online network tools, including traceroute, nslookup, whois, Domain Name Server ,ping, and our own Domain Dossier and Email Dossier. Some source code included.";
String keywords = UrlHelper.getDomainServer(request) + ", network tools, traceroute, nslookup, whois, dns, domain name server, ping";

%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>

	<script type="text/javascript" src="/js/network_tool.js"></script>
                <div id="leftSideContent">
                	<section class="block">
                    	<div class="blockContent">
                            <h3 class="blockHeading"><span>Network Tool</span></h3>
                            <div class="listDomain clearafter">
                            	<p class="topIntro">
                                	 Free online network tools, including traceroute, nslookup, whois, Domain Name Server ,ping, and our own Domain Dossier and Email Dossier. Some source code included.
                                </p>
                            	<h3 class="title">Enter a domain name:</h3>
                                <form class="searchDomain" action="" method="get">
                                    <div class="gridLayout gridLayout2 clearafter">
                                        <div class="gridCol">                                            
                                            <label>
                                                <input type="text" value="<%=name != null ? name : "" %>" size="25" name="domain">
                                                <% if (check.get("name") != null) { %>
                                                	<span class="error">(<%=check.get("name") %>)</span>
                                                <% } %>
                                            </label>                                            
                                        </div>
                                        <div class="gridCol lastCol">
                                            <button type="submit" class="buttonStyle">Checkout</button>
                                        </div>
                                    </div>
                                    <div class="searchOption clearafter">
                                        <div class="radioGroup clearafter">
                                            <div>
                                            	<label>
                                                    Ping
                                                    <br />
                                                    <input type="radio" name="type" value="ping" <%=type != null && type.equalsIgnoreCase("ping") ? "checked=\"checked\"" : "" %> />
                                                    <span></span>
                                                </label>
                                            </div>
                                            <div>
                                            	<label>
                                                    Lookup
                                                    <br />
                                                    <input type="radio" name="type" value="lookup" <%=type != null && type.equalsIgnoreCase("lookup") ? "checked=\"checked\"" : "" %> />
                                                    <span></span>
                                                </label>
                                            </div>
                                            <div>
                                            	<label>
                                                    Trace
                                                    <br />
                                                    <input type="radio" name="type" value="trace" <%=type != null && type.equalsIgnoreCase("trace") ? "checked=\"checked\"" : "" %> />
                                                    <span></span>
                                                </label>
                                            </div>
                                            <div>
                                            	<label>
                                                    DNS Records
                                                    <br />
                                                    <input type="radio" name="type" value="dnsrec" <%=type != null && type.equalsIgnoreCase("trace") ? "checked=\"checked\"" : "" %> />
                                                    <span></span>
                                                </label>
                                            </div>
                                            <div>
                                            	<label>
                                                    HTTP Headers  
                                                    <br />
                                                    <input type="radio" name="type" value="httphead" <%=type != null && type.equalsIgnoreCase("httphead") ? "checked=\"checked\"" : "" %> />
                                                    <span></span>
                                                </label>
                                            </div>
                                            <div>
                                            	<label>
                                                    Whois
                                                    <br />
                                                    <input type="radio" name="type" value="whois" <%=type != null && type.equalsIgnoreCase("whois") ? "checked=\"checked\"" : "" %> />
                                                    <span></span>
                                                </label>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                                
                                <% if (result != null && !result.isEmpty()) { %>
                                <h3 class="title"><%=name %></h3>    
                                <div class="info content-left">
                                	<%=result %>                            
                                </div>
                                <% } %>
                            </div>
                        </div>
                        <div class="blockShadow"></div>
                    </section> 
                    
                    <!-- ADV -->
                	<section class="block adv-detail">
                    	<div class="blockContent clearafter">
                    		<div class="clearafter">
                    			<div class="left">
	                    			<script type="text/javascript"><!--
									google_ad_client = "ca-pub-2883566427648799";
									/* epufloor_336x280 */
									google_ad_slot = "6977110282";
									google_ad_width = 336;
									google_ad_height = 280;
									//-->
									</script>
									<script type="text/javascript"
									src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
									</script>
	                    		</div>
	                    		<div class="right">
	                    			<script type="text/javascript"><!--
									google_ad_client = "ca-pub-2883566427648799";
									/* epufloor_336x280 */
									google_ad_slot = "6977110282";
									google_ad_width = 336;
									google_ad_height = 280;
									//-->
									</script>
									<script type="text/javascript"
									src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
									</script>
	                    		</div>
                    		</div>                    		
                    	</div>
                    	<div class="blockShadow"></div>
                    </section>
                	<!-- END ADV -->	               	
                </div>
                
                <!-- right content -->
                <jsp:include page="/elements/right.jsp" />
                <!-- end right content -->
                
<jsp:include page="/layouts/footer.jsp" />